import request from '@/config/axios'
export default {
  async getManagePage(base, params) {
    return await request.get({ url: `${base}/page`, params })
  },
  async getManageById(base, id) {
    return await request.get({ url: `${base}/get?id=` + id })
  },
  async manageCreate(base, data) {
    return await request.post({ url: `${base}/create`, data })
  },
  async manageUpdate(base, data) {
    return await request.put({ url: `${base}/update`, data })
  },
  async manageDelete(base, id) {
    return await request.delete({ url: `${base}/delete?id=` + id })
  },
  async manageExport(base, params) {
    return await request.download({
      url: `${base}/export-excel`,
      params
    })
  }
}
